import {drivingRequest} from "@/utils/HttpRequest";

export async function findByDrivingCategoryList(params?: any) {
  return drivingRequest<API.BaseArrayDataResult<API.DrivingCategory>>(
    "api/category/findByList", {
      method: "GET",params: {...params}
    })


}

export  async function editDrivingCategory(params:API.DrivingCategory){
  return drivingRequest<API.BaseResult>("api/category/edit",{
    method: "POST",
    data: params
  })
}

export async function findByDrivingLanguageList(params?: any) {
  return drivingRequest<API.BaseArrayDataResult<API.DrivingLanguage>>(
    "api/language/findByList", {
      method: "GET",params: {...params}
    })


}

export  async function editDrivingLanguage(params:API.DrivingLanguage){
  return drivingRequest<API.BaseResult>("api/language/edit",{
    method: "POST",
    data: params
  })
}

export async function findByDrivingQuestionBankList(params?: any) {
  return drivingRequest<API.BaseArrayDataResult<API.DrivingLanguage>>(
    "api/question/findByList", {
      method: "GET",params: {...params}
    })


}

export  async function editDrivingQuestionBank(params:API.DrivingLanguage){
  return drivingRequest<API.BaseResult>("api/question/edit",{
    method: "POST",
    data: params
  })
}
